package com.hexb.smh.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hexb.smh.entity.enums.LoginType;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author : hexb
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class LoginLog {

    private Integer id;

    private Integer accountId;

    @ApiModelProperty("操作类型(登录/注销)")
    private LoginType type;

    @ApiModelProperty("登录的ip")
    private String ip;

    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date createTime;

}
